package com.cql.controller;

import com.cql.pojo.User;
import config.FeignMultipartSupportConfig1;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(name = "bidding", fallback = AttachmeFeignClientImpl.class, configuration = FeignMultipartSupportConfig1.class)
public interface AttachmeFeignClient {

    @RequestMapping(value = "/attachmeController/multifileUpload", method = RequestMethod.POST, produces = {MediaType.APPLICATION_JSON_UTF8_VALUE},consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String upload(@RequestPart("file")MultipartFile file, @RequestParam("name") String name);
    //如果需要文件和其他数据传递，可用@RequestParam来传递，不可用@RequestBody
}
